<?php

namespace Xrfg\Api\Trading\Spot\Account\Resources;

use App\Http\Resources\Resource;
use Xrfg\Core\Common\Services\Proof;

class SpotAccountCapitalflowResource extends Resource
{
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'coin_id' => $this->coin_id,
            'user_id' => $this->user_id,
            'op_name' => Proof::getOpName($this->certificate),
            'created_at' => $this->created_at->toDateTimeString(),
            'available_number' => $this->available_number,
            'available_after' => $this->available_after,
            'disabled_number' => $this->disabled_number,
            'disabled_after' => $this->disabled_after,
        ];
    }
}
